<?php

/**
 * Created by PhpStorm.
 * User: yanshinian@yeah.net
 * Date: 2019/5/22
 * Time: 17:51.
 * pdd.ddk.goods.promotion.url.generate
 */
class DdkGoodsPromotionUrlGenerateRequest
{
    
    /**
     * @var int  自定义参数，为链接打上自定义标签；自定义参数最长限制64个字节；格式为： {"uid":"11111","sid":"22222"} ，其中 uid 用户唯一标识，可自行加密后传入，每个用户仅且对应一个标识，必填； sid 上下文信息标识，例如sessionId等，非必填。该json字符串中也可以加入其他自定义的key
     */
    private $custom_parameters;
    /**
     * @var BOOLEAN 是否生成店铺收藏券推广链接
     */
    private $generate_mall_collect_coupon;
    /**
     * @var BOOLEAN  是否生成qq小程序
     */
    private $generate_qq_app;
    /**
     * @var BOOLEAN  是否返回 schema URL
     */
    private $generate_schema_url;
    /**
     * @var BOOLEAN  是否生成短链接，true-是，false-否
     */
    private $generate_short_url;
    /**
     * @var BOOLEAN  是否生成唤起微信客户端链接，true-是，false-否，默认false
     */
    private $generate_weapp_webview;
    /**
     * @var BOOLEAN 是否生成微博推广链接
     */
    private $generate_weiboapp_webview;
    /**
     * @var BOOLEAN 是否生成小程序推广
     */
    private $generate_we_app;
    /**
     * @var LONG[] 商品ID，仅支持单个查询
     */
    private $goods_id_list;
    /**
     * @var BOOLEAN true--生成多人团推广链接 false--生成单人团推广链接（默认false）1、单人团推广链接：用户访问单人团推广链接，可直接购买商品无需拼团。2、多人团推广链接：用户访问双人团推广链接开团，若用户分享给他人参团，则开团者和参团者的佣金均结算给推手
     */
    private $multi_group;
    /**
     * @var BOOLEAN 推广位ID
     */
    private $p_id;
    /**
     * @var STRING 搜索id，建议填写，提高收益。来自pdd.ddk.goods.recommend.get、pdd.ddk.goods.search、pdd.ddk.top.goods.list.query等接口
     */
    private $search_id;
    /**
     * @var STRING 商多多客ID
     */
    private $zs_duo_id;

    private $apiParas = array();

    public function setCustomParameters($custom_parameters)
    {
        $this->custom_parameters = $custom_parameters;
        $this->apiParas['custom_parameters'] = $custom_parameters;
    }

    public function getCustomParameters()
    {
        return $this->custom_parameters;
    }

    public function setGenerateMallCollectCoupon($generate_mall_collect_coupon)
    {
        $this->generate_mall_collect_coupon = $generate_mall_collect_coupon;
        $this->apiParas['generate_mall_collect_coupon'] = $generate_mall_collect_coupon;
    }

    public function getGenerateMallCollectCoupon()
    {
        return $this->generate_mall_collect_coupon;
    }

    public function setGenerateQqApp($generate_qq_app)
    {
        $this->generate_qq_app = $generate_qq_app;
        $this->apiParas['generate_qq_app'] = $generate_qq_app;
    }

    public function getGenerateQqApp()
    {
        return $this->generate_qq_app;
    }

    public function setGenerateSchemaUrl($generate_schema_url)
    {
        $this->generate_schema_url = $generate_schema_url;
        $this->apiParas['generate_schema_url'] = $generate_schema_url;
    }

    public function getGenerateSchemaUrl()
    {
        return $this->generate_schema_url;
    }

    public function setGenerateShortUrl($generate_short_url)
    {
        $this->generate_short_url = $generate_short_url;
        $this->apiParas['generate_short_url'] = $generate_short_url;
    }

    public function getGenerateShortUrl()
    {
        return $this->generate_short_url;
    }

    public function setGenerateWeappWebview($generate_weapp_webview)
    {
        $this->generate_weapp_webview = $generate_weapp_webview;
        $this->apiParas['generate_weapp_webview'] = $generate_weapp_webview;
    }

    public function getGenerateWeappWebview()
    {
        return $this->generate_weapp_webview;
    }

    public function setGenerateWeiboappWebview($generate_weiboapp_webview)
    {
        $this->generate_weiboapp_webview = $generate_weiboapp_webview;
        $this->apiParas['generate_weiboapp_webview'] = $generate_weiboapp_webview;
    }

    public function getGenerateWeiboappWebview()
    {
        return $this->generate_weiboapp_webview;
    }

    public function setGenerateWeApp($generate_we_app)
    {
        $this->generate_we_app = $generate_we_app;
        $this->apiParas['generate_we_app'] = $generate_we_app;
    }

    public function getGenerateWeApp()
    {
        return $this->generate_we_app;
    }

    public function setGoodsIdList($goods_id_list)
    {
        $this->goods_id_list = $goods_id_list;
        $this->apiParas['goods_id_list'] = $goods_id_list;
    }

    public function getGoodsIdList()
    {
        return $this->goods_id_list;
    }

    public function setMultiGroup($multi_group)
    {
        $this->multi_group = $multi_group;
        $this->apiParas['multi_group'] = $multi_group;
    }

    public function getMultiGroup()
    {
        return $this->multi_group;
    }
   
    public function setPid($p_id)
    {
        $this->p_id = $p_id;
        $this->apiParas['p_id'] = $p_id;
    }

    public function getPid()
    {
        return $this->p_id;
    }

    public function setSearchId($search_id)
    {
        $this->search_id = $search_id;
        $this->apiParas['search_id'] = $search_id;
    }

    public function getSearchId()
    {
        return $this->search_id;
    }

    public function setZsDuoId($zs_duo_id)
    {
        $this->zs_duo_id = $zs_duo_id;
        $this->apiParas['zs_duo_id'] = $zs_duo_id;
    }

    public function getZsDuoId()
    {
        return $this->zs_duo_id;
    }
   
   

    public function getApiMethodName()
    {
        return 'pdd.ddk.goods.promotion.url.generate';
    }

    public function getApiParas()
    {
        return $this->apiParas;
    }

    public function check()
    {
        RequestCheckUtil::checkNotNull($this->p_id,"p_id");
        RequestCheckUtil::checkNotNull($this->goods_id_list,"goods_id_list");
    }

    public function putOtherTextParam($key, $value)
    {
        $this->apiParas[$key] = $value;
        $this->$key = $value;
    }
}
